Commit ee65c610 authored by Tony Mai's avatar Tony Mai

update

parent ebf7ebdc
......@@ -14,9 +14,25 @@ if len(sys.argv) < 2:
print ("Usage cp_fusion_files.py <destination directory> ")
exit()
file_path = sys.argv[1]
file_path = "/backup/"+sys.argv[1]
if os.path.isdir(file_path):
print ("directroy exist "+file_path+" exiting..")
exit()
elif os.path.exists(file_path):
print ("file exist "+file_path+" exiting..")
exit()
os.system("mkdir "+file_path)
print ("mkdir "+file_path)
if os.system("ifconfig wlan1 | grep inet") == "":
print ("wlan1 not connected to Gopro SSID. exiting...")
exit()
print ("file_path: " + file_path)
gpCam = GoProCamera.GoPro()
gpCam.pair(usepin=False)
......@@ -68,4 +84,9 @@ print ("Done")
localtime = time.asctime( time.localtime(time.time()) )
elapsed_time = time.time() - start_time
print ("End time :", localtime)
print ("Elapse time :", elapsed_time)
hours, rem = divmod(elasped_time, 3600)
minutes, seconds = divmod(rem, 60)
print("Elaspse time: "+"{:0>2}:{:0>2}:{:05.2f}".format(int(hours),int(minutes),seconds))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment