From 215db01776bf6c54ad8be88af423185d34029bbb Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Tue, 15 May 2012 04:01:23 +0000 Subject: [PATCH] Added conditional to check for exiv2 is insalled or not? svn: r19522 --- src/plugins/gramplet/EditExifMetadata.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/gramplet/EditExifMetadata.py b/src/plugins/gramplet/EditExifMetadata.py index 5849dac78..d0170e8f6 100644 --- a/src/plugins/gramplet/EditExifMetadata.py +++ b/src/plugins/gramplet/EditExifMetadata.py @@ -69,6 +69,7 @@ from PlaceUtils import conv_lat_lon from gen.db import DbTxn +# validate that pyexiv2 is installed and its version... import pyexiv2 # v0.1 has a different API to v0.2 and above @@ -78,12 +79,15 @@ else: # version_info attribute does not exist prior to v0.2.0 OLD_API = True -# define the Exiv2 command +# validate the exiv2 is installed and its executable system_platform = os.sys.platform if system_platform == "win32": EXIV2_FOUND = "exiv2.exe" if Utils.search_for("exiv2.exe") else False else: EXIV2_FOUND = "exiv2" if Utils.search_for("exiv2") else False +if not EXIV2_FOUND: + msg = 'You must have exiv2 and its development file installed.' + raise SystemExit(msg) #------------------------------------------------ # support functions