Selaa lähdekoodia

Properly save config files on Python 3 (closes #17); version bump

tags/v0.4
Ben Kurtovic 9 vuotta sitten
vanhempi
commit
51cac24562
3 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  1. +4
    -0
      CHANGELOG
  2. +1
    -1
      gitup/__init__.py
  3. +2
    -2
      gitup/config.py

+ 4
- 0
CHANGELOG Näytä tiedosto

@@ -1,3 +1,7 @@
v0.3.1 (unreleased):

- Fixed a bug related to Python 3 compatibility.

v0.3 (released June 7, 2015): v0.3 (released June 7, 2015):


- Added support for Python 3. - Added support for Python 3.


+ 1
- 1
gitup/__init__.py Näytä tiedosto

@@ -10,5 +10,5 @@ gitup: the git repository updater
__author__ = "Ben Kurtovic" __author__ = "Ben Kurtovic"
__copyright__ = "Copyright (C) 2011-2015 Ben Kurtovic" __copyright__ = "Copyright (C) 2011-2015 Ben Kurtovic"
__license__ = "MIT License" __license__ = "MIT License"
__version__ = "0.3"
__version__ = "0.3.1.dev0"
__email__ = "ben.kurtovic@gmail.com" __email__ = "ben.kurtovic@gmail.com"

+ 2
- 2
gitup/config.py Näytä tiedosto

@@ -46,7 +46,7 @@ def _load_config_file():
_migrate_old_config_path() _migrate_old_config_path()
config = configparser.SafeConfigParser() config = configparser.SafeConfigParser()
# Don't lowercase option names, because we are storing paths there: # Don't lowercase option names, because we are storing paths there:
config.optionxform = str
config.optionxform = lambda opt: opt
config.read(_get_config_path()) config.read(_get_config_path())
return config return config


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


def get_bookmarks(): def get_bookmarks():


Ladataan…
Peruuta
Tallenna