From 772f84d14ebc3105ce91c8272106450e1d4eadf0 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 19 Sep 2010 14:50:51 -0700 Subject: Make repoman tolerate errors from utime() when fetching metadata.dtd. --- bin/repoman | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/repoman b/bin/repoman index 9cbd58bc9..f2f16f25c 100755 --- a/bin/repoman +++ b/bin/repoman @@ -907,8 +907,15 @@ def fetch_metadata_dtd(): local_f.write(url_f.read()) local_f.close() if last_modified is not None: - os.utime(metadata_dtd_tmp, - (int(last_modified), int(last_modified))) + try: + os.utime(metadata_dtd_tmp, + (int(last_modified), int(last_modified))) + except OSError: + # This fails on some odd non-unix-like filesystems. + # We don't really need the mtime to be preserved + # anyway here (currently we use ctime to trigger + # fetch), so just ignore it. + pass os.rename(metadata_dtd_tmp, metadata_dtd) finally: try: -- cgit v1.2.3-1-g7c22