mirror of
https://gitlab.sectorq.eu/jaydee/auto_import.git
synced 2025-12-14 10:34:53 +01:00
build
This commit is contained in:
@@ -154,6 +154,7 @@ while True:
|
||||
# myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=101;sleep 1;/sbin/hal_app --se_buzzer enc_id=0,mode=101;sleep 1;/sbin/hal_app --se_buzzer enc_id=0,mode=101"
|
||||
# status, output = subprocess.getstatusoutput(myCmd)
|
||||
# If device is set and DCIM exists, move files by date
|
||||
moved_fine = True
|
||||
if not _DEV == "":
|
||||
if os.path.exists(_DEV_DIR):
|
||||
for file_or_dir in os.listdir(_DEV_DIR):
|
||||
@@ -185,7 +186,7 @@ while True:
|
||||
files_imported += 1
|
||||
except:
|
||||
logging.debug("failed to move file {}".format(filename))
|
||||
|
||||
moved_fine = False
|
||||
#myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=100"
|
||||
#subprocess.getstatusoutput(myCmd)
|
||||
else:
|
||||
@@ -201,6 +202,12 @@ while True:
|
||||
files_imported += 1
|
||||
except:
|
||||
logging.debug("failed to move file {}".format(file_or_dir))
|
||||
moved_fine = False
|
||||
|
||||
|
||||
if moved_fine:
|
||||
print("All files moved successfully")
|
||||
print(f"Removing {_DEV_DIR}*")
|
||||
logging.debug("Umounting")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user