mirror of https://github.com/progval/irctest.git
Make it possible to specify a mode for opening Sopel files.
This commit is contained in:
parent
83eaa42bb5
commit
aa6ab3a77d
|
@ -32,9 +32,9 @@ class SopelController(BaseClientController):
|
||||||
except OSError: # File does not exist
|
except OSError: # File does not exist
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def open_file(self, filename):
|
def open_file(self, filename, mode='a'):
|
||||||
return open(os.path.join(os.path.expanduser('~/.sopel/'), filename),
|
return open(os.path.join(os.path.expanduser('~/.sopel/'), filename),
|
||||||
'a')
|
mode)
|
||||||
|
|
||||||
def create_config(self):
|
def create_config(self):
|
||||||
self.directory = tempfile.TemporaryDirectory()
|
self.directory = tempfile.TemporaryDirectory()
|
||||||
|
|
Loading…
Reference in New Issue