summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-06-03 15:00:14 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-06-03 15:00:14 +0000
commit318834617293a34ee41b4592027c95972200dc55 (patch)
treeab7ee2f8f8e5fab83a8a993d1d4fae3974eab800 /src
parent8aa090fde5cc8c99ca425ceeab3e49b69e4b1844 (diff)
downloadbcfg2-318834617293a34ee41b4592027c95972200dc55.tar.gz
bcfg2-318834617293a34ee41b4592027c95972200dc55.tar.bz2
bcfg2-318834617293a34ee41b4592027c95972200dc55.zip
netzero fix for .cat/diff files
(Logical change 1.231) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@965 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Generators/Cfg.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/Server/Generators/Cfg.py b/src/lib/Server/Generators/Cfg.py
index 9e17cc7d9..5f4d0fc39 100644
--- a/src/lib/Server/Generators/Cfg.py
+++ b/src/lib/Server/Generators/Cfg.py
@@ -33,11 +33,20 @@ class FileEntry(FileBacked):
except IndexError:
most2 = 0
if most1 == most2:
- if self.name.split('.')[-1][0] not in ['C', 'B']:
+ if self.name.split('.')[-1] in ['cat', 'diff']:
+ meta1 = self.name.split('.')[-2]
+ else:
+ meta1 = self.name.split('.')[-1]
+ if other.name.split('.')[-1] in ['cat', 'diff']:
+ meta2 = other.name.split('.')[-2]
+ else:
+ meta2 = other.name.split('.')[-1]
+
+ if meta1[0] not in ['C', 'B']:
return 0
# need to tiebreak with numeric prio
- prio1 = int(self.name.split('.')[-1][1:3])
- prio2 = int(other.name.split('.')[-1][1:3])
+ prio1 = int(meta1[1:3])
+ prio2 = int(meta2[1:3])
return prio1 - prio2
else:
return most1 - most2