diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-03-07 20:13:10 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-03-07 20:13:10 +0000 |
commit | 239badea9be1dd7857833408209ef22dd99773de (patch) | |
tree | 80374571f6fab646c8e38ba8bffc3fb1477440d0 /synapse/config | |
parent | Merge pull request #626 from matrix-org/erikj/visibility (diff) | |
download | synapse-239badea9be1dd7857833408209ef22dd99773de.tar.xz |
Use syntax that works on both py2.7 and py3
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/__main__.py | 2 | ||||
-rw-r--r-- | synapse/config/_base.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/config/__main__.py b/synapse/config/__main__.py index 0a3b70e11f..58c97a70af 100644 --- a/synapse/config/__main__.py +++ b/synapse/config/__main__.py @@ -28,7 +28,7 @@ if __name__ == "__main__": sys.stderr.write("\n" + e.message + "\n") sys.exit(1) - print getattr(config, key) + print (getattr(config, key)) sys.exit(0) else: sys.stderr.write("Unknown command %r\n" % (action,)) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 15d78ff33a..7449f36491 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -104,7 +104,7 @@ class Config(object): dir_path = cls.abspath(dir_path) try: os.makedirs(dir_path) - except OSError, e: + except OSError as e: if e.errno != errno.EEXIST: raise if not os.path.isdir(dir_path): |