Skip to content
Browse files

fixed an error with creating the directory

  • Loading branch information...
1 parent a05e48c commit eae6cdb9f9163ee2e28bfbab1182a47ea313429a @ajoslin committed Apr 19, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 hashcal.py
View
4 hashcal.py
@@ -17,8 +17,10 @@
def file_check(fn):
def wrap(self, file_name, *args):
+ directory = file_name[:file_name.rfind("/")]
+ if not os.path.exists(directory):
+ os.makedirs(directory) #create directory
if not os.path.exists(file_name):
- os.makedirs(options.file[:file_name.rfind("/")]) #create directory
file(file_name, "w").close() # create file and close it
fn(self, file_name, *args)
return wrap

0 comments on commit eae6cdb

Please sign in to comment.
Something went wrong with that request. Please try again.