Browse Source

Check if file already exists

Jérôme BUISINE 4 years ago
parent
commit
0d9ef1d629
1 changed files with 4 additions and 1 deletions
  1. 4 1
      run/convert_all_rawls.py

+ 4 - 1
run/convert_all_rawls.py

@@ -26,7 +26,10 @@ def main():
         if not os.path.exists(output_folder):
             os.makedirs(output_folder)
         
-        os.system(f'./build/main/rawls_convert --image {img} --outfile {output_path}')
+        if not os.path.exists(output_path):
+            os.system(f'./build/main/rawls_convert --image {img} --outfile {output_path}')
+        else:
+            print(f'{output_path} already exists')
     
 
 if __name__ == "__main__":