fb-tools 2.9.2__tar.gz → 2.9.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fb_tools-2.9.2 → fb_tools-2.9.4}/PKG-INFO +1 -1
- {fb_tools-2.9.2 → fb_tools-2.9.4}/data/share/locale/de/LC_MESSAGES/fb_tools.mo +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/data/share/locale/en/LC_MESSAGES/fb_tools.mo +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/__init__.py +1 -1
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/handler/lock.py +12 -4
- {fb_tools-2.9.2 → fb_tools-2.9.4}/LICENSE +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/README.md +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/pyproject.toml +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/app.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/application/__init__.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/application/get_file_rm.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/application/myip.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/application/show_spinner.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/application/update_ddns.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/argparse_actions.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/cfg_app.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/colcts.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/collections.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/common.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/config.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/ddns/__init__.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/ddns/config.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/ddns/errors.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/errors.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/handler/__init__.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/handling_obj.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/mailaddress.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/merge.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/multi_config/__init__.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/multi_config/files.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/multi_config/inits.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/multi_config/read.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/obj.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/pidfile.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/socket_obj/__init__.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/socket_obj/tcp.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/socket_obj/unix.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/spinner.py +0 -0
- {fb_tools-2.9.2 → fb_tools-2.9.4}/src/fb_tools/xlate.py +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -35,7 +35,7 @@ from ..errors import CouldntOccupyLockfileError, HandlerError
|
|
|
35
35
|
from ..obj import FbBaseObject
|
|
36
36
|
from ..xlate import XLATOR
|
|
37
37
|
|
|
38
|
-
__version__ = "2.0
|
|
38
|
+
__version__ = "2.1.0"
|
|
39
39
|
|
|
40
40
|
LOG = logging.getLogger(__name__)
|
|
41
41
|
|
|
@@ -50,6 +50,14 @@ _ = XLATOR.gettext
|
|
|
50
50
|
ngettext = XLATOR.ngettext
|
|
51
51
|
|
|
52
52
|
|
|
53
|
+
# =============================================================================
|
|
54
|
+
def utcfromtimestamp(timestamp):
|
|
55
|
+
"""Provide a substitute for datetime.datetime.utcfromtimestamp."""
|
|
56
|
+
return datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc) + datetime.timedelta(
|
|
57
|
+
seconds=timestamp
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
53
61
|
# =============================================================================
|
|
54
62
|
class LockHandlerError(HandlerError):
|
|
55
63
|
"""
|
|
@@ -232,9 +240,9 @@ class LockObject(FbBaseObject):
|
|
|
232
240
|
if lfile.exists():
|
|
233
241
|
fstat = self.stat()
|
|
234
242
|
if not self.ctime:
|
|
235
|
-
self._ctime =
|
|
243
|
+
self._ctime = utcfromtimestamp(fstat.st_ctime)
|
|
236
244
|
if not self.mtime:
|
|
237
|
-
self._mtime =
|
|
245
|
+
self._mtime = utcfromtimestamp(fstat.st_mtime)
|
|
238
246
|
else:
|
|
239
247
|
if not self.ctime:
|
|
240
248
|
self._ctime = datetime.datetime.utcnow()
|
|
@@ -413,7 +421,7 @@ class LockObject(FbBaseObject):
|
|
|
413
421
|
if not self.simulate:
|
|
414
422
|
os.utime(str(self.lockfile), None)
|
|
415
423
|
|
|
416
|
-
self._mtime =
|
|
424
|
+
self._mtime = utcfromtimestamp(self.stat().st_mtime)
|
|
417
425
|
|
|
418
426
|
|
|
419
427
|
# =============================================================================
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|