Skip to content

Commit 51cac24

Browse files
committed
Properly save config files on Python 3 (closes earwig#17); version bump
1 parent 45d8e6c commit 51cac24

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v0.3.1 (unreleased):
2+
3+
- Fixed a bug related to Python 3 compatibility.
4+
15
v0.3 (released June 7, 2015):
26

37
- Added support for Python 3.

gitup/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
__author__ = "Ben Kurtovic"
1111
__copyright__ = "Copyright (C) 2011-2015 Ben Kurtovic"
1212
__license__ = "MIT License"
13-
__version__ = "0.3"
13+
__version__ = "0.3.1.dev0"
1414
__email__ = "[email protected]"

gitup/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _load_config_file():
4646
_migrate_old_config_path()
4747
config = configparser.SafeConfigParser()
4848
# Don't lowercase option names, because we are storing paths there:
49-
config.optionxform = str
49+
config.optionxform = lambda opt: opt
5050
config.read(_get_config_path())
5151
return config
5252

@@ -55,7 +55,7 @@ def _save_config_file(config):
5555
_migrate_old_config_path()
5656
cfg_path = _get_config_path()
5757
_ensure_dirs(cfg_path)
58-
with open(cfg_path, "wb") as config_file:
58+
with open(cfg_path, "w") as config_file:
5959
config.write(config_file)
6060

6161
def get_bookmarks():

0 commit comments

Comments
 (0)