Removed default value fuckery. The matching class wil have to provide proper values.

This commit is contained in:
2020-03-14 20:42:01 +01:00
parent 13555a0505
commit 4a7de7b518
2 changed files with 10 additions and 9 deletions

View File

@@ -107,9 +107,9 @@ class Exif:
Exif-Comment that has been written (incl. radiation)
'''
def __init__(self, photo, dry_run, radiation=False, latitude=False, longitude=False, elevation=False):
self.write_exif = self._write_exif(photo, radiation, latitude,
longitude, elevation, dry_run)
def __init__(self, photo, dry_run, radiation, latitude, longitude, elevation):
self.write_exif = self._write_exif(photo, dry_run, radiation, latitude,
longitude, elevation)
def __repr__(self):
return 'Position: %s, %s: %s ' % self.write_exif
@@ -133,7 +133,7 @@ class Exif:
metadata = pyexiv2.ImageMetadata(photo)
metadata.read()
if latitude or longitude:
if latitude and longitude:
latitude_degree = self._to_degree(latitude, ["S", "N"])
longitude_degree = self._to_degree(longitude, ["W", "E"])
@@ -163,7 +163,7 @@ class Exif:
if radiation:
# Set new UserComment
new_comment = 'Radiation ☢ ' + str(radiation) + ' µS/h'
new_comment = 'Radiation ☢ : ' + str(radiation) + ' µS/h'
metadata['Exif.Photo.UserComment'] = new_comment
else:
new_comment = None