Code

Extensions. Color Markers extension improvements (Bug #692582, Color markers to match...
[inkscape.git] / share / extensions / export_gimp_palette.py
index 3a9d227cf6f799da616fbbbdaa682d473313bc4f..b9d6a10598bf3e906719e8d5a5846911b8a31a68 100644 (file)
@@ -11,7 +11,7 @@ import sys, simplestyle
 try:
     from xml.dom.minidom import parse
 except:
-    sys.exit('The export_gpl.py module requires PyXML. Please download the latest version from <http://pyxml.sourceforge.net/>.')
+    sys.exit(_('The export_gpl.py module requires PyXML.  Please download the latest version from http://pyxml.sourceforge.net/.'))
 
 colortags=(u'fill',u'stroke',u'stop-color',u'flood-color',u'lighting-color')
 colors={}
@@ -24,7 +24,7 @@ def walk(node):
             walk(child)
 
 def checkStyle(node):
-    if node.hasAttributes():
+    if hasattr(node,"hasAttributes") and node.hasAttributes():
         sa=node.getAttribute('style')
         if sa!='':
             styles=simplestyle.parseStyle(sa)
@@ -44,4 +44,7 @@ walk(dom)
 print 'GIMP Palette\nName: %s\n#' % (dom.getElementsByTagName('svg')[0].getAttribute(DOCNAME).split('.')[0])
 
 for k,v in sorted(colors.items()):
-    print k+v
\ No newline at end of file
+    print k+v
+
+
+# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99