@@ -285,32 +285,35 @@ def resolveValue(name, value, aliasDict):
285
285
#
286
286
result = None
287
287
288
- # Attempt to split the value on '__' .
288
+ # If the value is a string, attempt to resolve it .
289
289
#
290
- valueParts = value .split ('__' )
291
-
292
- # If there is a context part, resolve the value as a name.
293
- #
294
- if 2 == len (valueParts ):
295
- result = resolveName (value , aliasDict )
296
-
297
- # If the name exists in the alias dictionary, and if the value exists in
298
- # the sub-dictionary for the name, create a URL using the pattern for the
299
- # value. A wildcard (*) for a value key in the dictionary matches any
300
- # value.
301
- #
302
- elif name in aliasDict ['values' ]:
303
- subDict = aliasDict ['values' ][name ]
304
-
305
- pattern = None
290
+ if True == isinstance (value , str ) or True == isinstance (value , unicode ):
291
+ # Attempt to split the value on '__'.
292
+ #
293
+ valueParts = value .split ('__' )
306
294
307
- if value in subDict :
308
- pattern = subDict [ value ]
309
- elif '*' in subDict :
310
- pattern = subDict [ '*' ]
295
+ # If there is a context part, resolve the value as a name.
296
+ #
297
+ if 2 == len ( valueParts ) :
298
+ result = resolveName ( value , aliasDict )
311
299
312
- if pattern is not None :
313
- result = makeURL (value , pattern )
300
+ # If the name exists in the alias dictionary, and if the value exists
301
+ # in the sub-dictionary for the name, create a URL using the pattern
302
+ # for the value. A wildcard (*) for a value key in the dictionary
303
+ # matches any value.
304
+ #
305
+ elif name in aliasDict ['values' ]:
306
+ subDict = aliasDict ['values' ][name ]
307
+
308
+ pattern = None
309
+
310
+ if value in subDict :
311
+ pattern = subDict [value ]
312
+ elif '*' in subDict :
313
+ pattern = subDict ['*' ]
314
+
315
+ if pattern is not None :
316
+ result = makeURL (value , pattern )
314
317
315
318
# Return the resolved name if one was found.
316
319
#
@@ -507,7 +510,7 @@ def ncldDump(inputFile, aliasFile, outputFile):
507
510
508
511
# Add a filePath entry.
509
512
#
510
- ncDict ['filePath' ] = inputFile
513
+ ncDict ['filePath' ] = os . path . split ( inputFile )[ - 1 ]
511
514
512
515
# Create a jinja environment and template object.
513
516
#
0 commit comments