From 8ff59fdaf0d088fcf06184b1026ede938d65a561 Mon Sep 17 00:00:00 2001 From: brent s Date: Fri, 15 Sep 2017 09:47:05 -0400 Subject: [PATCH] yikes --- arch/repoclone.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/repoclone.py b/arch/repoclone.py index bf40899..878a8bf 100755 --- a/arch/repoclone.py +++ b/arch/repoclone.py @@ -54,15 +54,16 @@ def sync(args): with open(args['lockfile'], 'w') as f: f.write(str(os.getpid())) with open(args['logfile'], 'a') as log: - try: - subprocess.call(cmd, stdout = log, stderr = subprocess.STDOUT) - now = int(datetime.datetime.timestamp(datetime.datetime.utcnow())) - with open(os.path.join(dest['path'], 'lastsync'), 'w') as f: - f.write(str(now) + '\n') - os.remove(args['lockfile']) - except: - os.remove(args['lockfile']) - exit('!! The rsync has failed. See {0} for more details. !!'.format(args['logfile'])) +# try: + # Disabled the try/except because otherwise it complains on broken symlinks. Gah! + subprocess.call(cmd, stdout = log, stderr = subprocess.STDOUT) + now = int(datetime.datetime.timestamp(datetime.datetime.utcnow())) + with open(os.path.join(dest['path'], 'lastsync'), 'w') as f: + f.write(str(now) + '\n') + os.remove(args['lockfile']) +# except: +# os.remove(args['lockfile']) +# exit('!! The rsync has failed. See {0} for more details. !!'.format(args['logfile'])) return() def getDefaults():