Author: elias
Date: Sun Mar 20 22:55:30 2011
New Revision: 48964
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48964&view=rev
Log:
[wesnoth_addon_manager] Allow empty lines in ignore lists.
Modified:
trunk/data/tools/wesnoth/campaignserver_client.py
trunk/data/tools/wesnoth_addon_manager
Modified: trunk/data/tools/wesnoth/campaignserver_client.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/campaignserver_client.py?rev=48964&r1=48963&r2=48964&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/campaignserver_client.py (original)
+++ trunk/data/tools/wesnoth/campaignserver_client.py Sun Mar 20 22:55:30 2011
@@ -314,7 +314,7 @@
def put_file(name, f):
for ig in ign:
- if ig[-1] != "/" and fnmatch.fnmatch(name, ig):
+ if ig and ig[-1] != "/" and fnmatch.fnmatch(name, ig):
print("Ignored file", name)
return None
fileNode = wmldata.DataSub("file")
@@ -334,9 +334,10 @@
def put_dir(name, path):
for ig in ign:
- if ig[-1] == "/" and fnmatch.fnmatch(name, ig[:-1]):
+ if ig and ig[-1] == "/" and fnmatch.fnmatch(name, ig[:-1]):
print("Ignored dir", name)
return None
+
dataNode = wmldata.DataSub("dir")
dataNode.set_text_val("name", name)
for fn in glob.glob(path + "/*"):
Modified: trunk/data/tools/wesnoth_addon_manager
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth_addon_manager?rev=48964&r1=48963&r2=48964&view=diff
==============================================================================
--- trunk/data/tools/wesnoth_addon_manager (original)
+++ trunk/data/tools/wesnoth_addon_manager Sun Mar 20 22:55:30 2011
@@ -292,7 +292,7 @@
if os.path.exists(ignfile):
ign = open(ignfile).readlines()
# strip line endings and whitespace
- ign = [i.strip() for i in ign]
+ ign = [i.strip() for i in ign if i.strip()]
else:
ign = [
".*",
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits