Skip to content

Commit

Permalink
Exit if unmaskfile can not be created
Browse files Browse the repository at this point in the history
  • Loading branch information
tom111 committed Oct 15, 2012
1 parent c1aa675 commit 4aaef23
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions scripts/tatt
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,17 @@ if not myJob.packageList==None:
try:
unmaskfile=open(config['unmaskfile'], 'r+')
except IOError:
# create an empty file, this should be beautified
unmaskfile=open(config['unmaskfile'], 'w')
unmaskfile.write(" ")
unmaskfile.close()
print "Your unmaskfile was not found, I will create it as"
print config['unmaskfile']
try:
unmaskfile=open(config['unmaskfile'], 'w')
unmaskfile.write(" ")
unmaskfile.close()
except IOError:
print " ".join(["Can not create unmaskfile",config['unmaskfile']])
print "Probably you want to configure a different file in your ~/.tatt"
print "Exiting"
exit(1)
unmaskfile=open(config['unmaskfile'], 'r+')

unmaskfileContent = unmaskfile.read()
Expand Down

0 comments on commit 4aaef23

Please sign in to comment.