pyreposync 0.2.1__tar.gz → 0.2.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyreposync
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Orbit Api
5
5
  Project-URL: Source, https://github.com/schlitzered/pyreposync
6
6
  Author-email: "Stephan.Schultchen" <sschultchen@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pyreposync"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  requires-python = ">=3.6"
9
9
  authors = [
10
10
  {name = "Stephan.Schultchen", email = "sschultchen@gmail.com"},
@@ -86,15 +86,24 @@ class SyncRPM(SyncGeneric):
86
86
  self.log.error(
87
87
  f"could not migrate {location}: {destination_old} not found"
88
88
  )
89
- continue
90
89
  except OSError as err:
91
90
  self.log.error(f"could not migrate {location}: {err}")
92
- continue
93
91
 
94
92
  for snap in self.snap_list_timestamp_snapshots():
95
93
  self.log.info(f"migrating {snap}")
96
94
  base_path = f"{self.destination}/snap/{self.reponame}/{snap}"
97
95
  for location, hash_algo, hash_sum in self.packages(base_path=base_path):
96
+ destination_old = f"{self.destination}/sync/{self.reponame}/{location}"
97
+ destination_new = f"{self.destination}/sync/{self.reponame}/{location}.{hash_algo}.{hash_sum}"
98
+ try:
99
+ os.rename(destination_old, destination_new)
100
+ except FileNotFoundError:
101
+ self.log.error(
102
+ f"could not migrate {location}: {destination_old} not found"
103
+ )
104
+ except OSError as err:
105
+ self.log.error(f"could not migrate {location}: {err}")
106
+
98
107
  dst = f"{base_path}/{location}"
99
108
  src = f"{self.destination}/sync/{self.reponame}/{location}.{hash_algo}.{hash_sum}"
100
109
  try:
File without changes
File without changes
File without changes
File without changes
File without changes