mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-17 14:04:28 +01:00
change file() statement to open()
This commit is contained in:
@@ -105,11 +105,12 @@ class fseditCmd(cmd.Cmd):
|
||||
def save_pickle(self):
|
||||
'''saves the current file system to the pickle'''
|
||||
try:
|
||||
pickle.dump(self.fs, file(self.pickle_file_path, 'wb'))
|
||||
except:
|
||||
pickle.dump(self.fs, open(self.pickle_file_path, 'wb'))
|
||||
except Exception as e:
|
||||
print((("Unable to save pickle file '%s'. " + \
|
||||
"Are you sure you have write access?") % \
|
||||
(self.pickle_file_path,)))
|
||||
print(str(e))
|
||||
sys.exit(1)
|
||||
|
||||
def do_exit(self, args):
|
||||
|
||||
Reference in New Issue
Block a user