From ac4d4449321e777f090ea415bba723ee4440ff8b Mon Sep 17 00:00:00 2001 From: Sebastian Luther Date: Fri, 29 Nov 2013 19:02:22 +0100 Subject: [PATCH] Use portage.const.TIMESTAMP_FORMAT where appropriate --- pym/_emerge/actions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 86d67d2b1..9bb47741d 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -39,7 +39,7 @@ from portage import shutil from portage import eapi_is_supported, _encodings, _unicode_decode from portage.cache.cache_errors import CacheError from portage.const import GLOBAL_CONFIG_PATH, VCS_DIRS, _DEPCLEAN_LIB_CHECK_DEFAULT -from portage.const import SUPPORTED_BINPKG_FORMATS +from portage.const import SUPPORTED_BINPKG_FORMATS, TIMESTAMP_FORMAT from portage.dbapi.dep_expand import dep_expand from portage.dbapi._expand_new_virt import expand_new_virt from portage.dep import Atom @@ -2282,7 +2282,7 @@ def _sync_repo(emerge_config, repo): if content: try: mytimestamp = time.mktime(time.strptime(content[0], - "%a, %d %b %Y %H:%M:%S +0000")) + TIMESTAMP_FORMAT)) except (OverflowError, ValueError): pass del content @@ -2511,7 +2511,7 @@ def _sync_repo(emerge_config, repo): if content: try: servertimestamp = time.mktime(time.strptime( - content[0], "%a, %d %b %Y %H:%M:%S +0000")) + content[0], TIMESTAMP_FORMAT)) except (OverflowError, ValueError): pass del mycommand, mypids, content -- 2.26.2