diff options
author | tailor <cygnus@janrain.com> | 2006-03-06 19:34:33 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-03-06 19:34:33 +0000 |
commit | d8b74004ed4cc3b17b61e0d56870f08550ee9b2b (patch) | |
tree | d6364a34c0f1a518c72eb9623a467fc7c2a58ff0 /admin/packagexml.py | |
parent | 212f0d77730557a2428a16a24791cf3c0d297f60 (diff) | |
download | php-openid-d8b74004ed4cc3b17b61e0d56870f08550ee9b2b.zip php-openid-d8b74004ed4cc3b17b61e0d56870f08550ee9b2b.tar.gz php-openid-d8b74004ed4cc3b17b61e0d56870f08550ee9b2b.tar.bz2 |
[project @ Updated package.xml template and added logic for assigning roles to entire directories in packagexml.py]
Diffstat (limited to 'admin/packagexml.py')
-rw-r--r-- | admin/packagexml.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/admin/packagexml.py b/admin/packagexml.py index eec60dc..b231c4a 100644 --- a/admin/packagexml.py +++ b/admin/packagexml.py @@ -48,15 +48,14 @@ def buildContentsXMLFordir(dir_or_file, roles, depth=0, dir_role=None, if not all_files: return [] - if extension in roles: # Ends in an extension we care about + if all_files and dir_role: + return ['%s<file name="%s" role="%s" />' % + (INDENT_STRING * depth, os.path.basename(dir_or_file), dir_role)] + elif extension in roles: # Ends in an extension we care about return ['%s<file name="%s" role="%s" />' % (INDENT_STRING * depth, os.path.basename(dir_or_file), roles[extension])] - elif all_files: - return ['%s<file name="%s" />' % - (INDENT_STRING * depth, os.path.basename(dir_or_file))] else: - print "FOOB for %s %s" % (all_files, dir_or_file) return [] def buildContentsXML(roles, *dirs): |