Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

Commit 4f1be64

Browse files
committed
Update settings: compatibility with python3
1 parent 330bf2f commit 4f1be64

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

swf/settings.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
# See the file LICENSE for copying permission.
77

88
import os
9-
from ConfigParser import ConfigParser
9+
try:
10+
from ConfigParser import ConfigParser
11+
except ImportError:
12+
from configparser import ConfigParser
1013

1114

1215
def from_stream(stream):
@@ -129,4 +132,4 @@ def get(path='.swf'):
129132
def set(**settings):
130133
"""Set settings"""
131134
from swf.core import SETTINGS
132-
SETTINGS.update({k: v for k, v in settings.iteritems() if v is not None})
135+
SETTINGS.update({k: v for k, v in settings.items() if v is not None})

0 commit comments

Comments
 (0)