Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3808311

Browse files
committed
rsync: fix SyntaxWarning when using Python 3.14
Thanks-to: Brian Harring <ferringb@gmail.com>Resolves:#448Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parentc9cfe2a commit3808311

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

‎NEWS.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ pkgcore 0.12.31 (????-??-??)
1111

1212
- rsync: fix logical bug with negative sync delta (Arthur Zamarin)
1313

14+
- rsync: fix SyntaxWarning when using Python 3.14 (Arthur Zamarin, #448)
15+
1416
----------------------------
1517
pkgcore 0.12.30 (2025-06-02)
1618
----------------------------

‎src/pkgcore/sync/rsync.py‎

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -228,22 +228,20 @@ def _sync(self, verbosity, force=False):
228228
# force a reset of the timestamp
229229
self.last_timestamp=self.current_timestamp()
230230
finally:
231-
ifret:
232-
returnret
233-
# ensure the timestamp is back to the old
234-
try:
235-
timestamp_path=pjoin(self.basedir,"metadata","timestamp.chk")
236-
ifself.last_timestampisNone:
237-
os.remove(timestamp_path)
238-
else:
239-
withopen(timestamp_path,"w")asf:
240-
f.write(
241-
time.strftime(
242-
"%a, %d %b %Y %H:%M:%S +0000",
243-
time.gmtime(self.last_timestamp),
231+
ifnotret:
232+
# ensure the timestamp is back to the old
233+
try:
234+
timestamp_path=pjoin(self.basedir,"metadata","timestamp.chk")
235+
ifself.last_timestampisNone:
236+
os.remove(timestamp_path)
237+
else:
238+
withopen(timestamp_path,"w")asf:
239+
f.write(
240+
time.strftime(
241+
"%a, %d %b %Y %H:%M:%S +0000",
242+
time.gmtime(self.last_timestamp),
243+
)
244244
)
245-
)
246-
exceptEnvironmentError:
247-
# don't care...
248-
pass
245+
exceptEnvironmentError:
246+
pass# don't care...
249247
returnret

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp