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):
|
def save_pickle(self):
|
||||||
'''saves the current file system to the pickle'''
|
'''saves the current file system to the pickle'''
|
||||||
try:
|
try:
|
||||||
pickle.dump(self.fs, file(self.pickle_file_path, 'wb'))
|
pickle.dump(self.fs, open(self.pickle_file_path, 'wb'))
|
||||||
except:
|
except Exception as e:
|
||||||
print((("Unable to save pickle file '%s'. " + \
|
print((("Unable to save pickle file '%s'. " + \
|
||||||
"Are you sure you have write access?") % \
|
"Are you sure you have write access?") % \
|
||||||
(self.pickle_file_path,)))
|
(self.pickle_file_path,)))
|
||||||
|
print(str(e))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def do_exit(self, args):
|
def do_exit(self, args):
|
||||||
|
|||||||
Reference in New Issue
Block a user