Commits

Rodrigo Bistolfi  committed adf106a

timezone: rm target of symlink if it exists

  • Participants
  • Parent commits 9ae914d

Comments (0)

Files changed (1)

File vinstall/backend/timezone.py

         raise RuntimeError("Invalid timezone: %s" % tz)
     src = os.path.join(ZONEINFO, tz)
     dst = os.path.join(root, LOCAL_TZ)
+    cpy = os.path.join(root, "etc/localtime-copied-from")
+    if os.path.exists(dst):
+        os.remove(dst)
+    if os.path.exists(cpy):
+        os.remove(cpy)
     return os.symlink(src, dst)