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