I didn't meant to remove the 'if not os.path.exists(filename)' statement.
Reviewed-by: Brian Paul <brianp@vmware.com>
(commit, foo) = subprocess.Popen(args, stdout=subprocess.PIPE).communicate()
except:
# git log command didn't work
- dirname = os.path.dirname(filename)
- if not os.path.exists(dirname):
- os.makedirs(dirname)
+ if not os.path.exists(filename):
+ dirname = os.path.dirname(filename)
+ if not os.path.exists(dirname):
+ os.makedirs(dirname)
# create an empty file if none already exists
f = open(filename, "w")
f.close()