Browse code

* s3cmd: Print a nice error message when --exclude-from file is not readable.

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@318 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2008/12/31 13:28:58
Showing 2 changed files
... ...
@@ -1,5 +1,7 @@
1 1
 2008-12-31  Michal Ludvig  <michal@logix.cz>
2 2
 
3
+	* s3cmd: Print a nice error message when --exclude-from
4
+	  file is not readable.
3 5
 	* S3/PkgInfo.py: Bumped up version to 0.9.9-pre4
4 6
 	* S3/Exceptions.py: Added missing imports.
5 7
 	* NEWS: Updated.
... ...
@@ -1047,7 +1047,11 @@ def run_configure(config_file):
1047 1047
 		sys.exit(1)
1048 1048
 
1049 1049
 def process_exclude_from_file(exf, exclude_array):
1050
-	exfi = open(exf, "rt")
1050
+	try:
1051
+		exfi = open(exf, "rt")
1052
+	except IOError, e:
1053
+		error(e)
1054
+		sys.exit(1)
1051 1055
 	for ex in exfi:
1052 1056
 		ex = ex.strip()
1053 1057
 		if re.match("^#", ex) or re.match("^\s*$", ex):