File sgmltools-lite-html.diff of Package sgmltools-lite

Index: sgmltools-lite-3.0.2/python/utils.py
===================================================================
--- sgmltools-lite-3.0.2.orig/python/utils.py
+++ sgmltools-lite-3.0.2/python/utils.py
@@ -352,7 +352,8 @@ class Tracer:
     def rmdir(self, dir):
 	"""Shorthand for the pattern trace('rmdir ' + x);os.rmdir(x)"""
 	self.trace('rmdir ' + dir)
-	os.rmdir(dir)
+        if os.path.exists(dir):
+           os.rmdir(dir)
 
     def symlink(self, src, dest):
 	"""Shorthand for the pattern trace('symlink... );os.symlink(...)"""
Index: sgmltools-lite-3.0.2/python/backends/Html.py
===================================================================
--- sgmltools-lite-3.0.2.orig/python/backends/Html.py
+++ sgmltools-lite-3.0.2/python/backends/Html.py
@@ -56,9 +56,9 @@ class Html(Backend):
 	destdir = os.path.join(self._fileparts[1], self._fileparts[0])
 
         if os.path.exists(destdir):
-            self._tracer.system('rm -rf ' + destdir + '/*')
-        else:
-            self._tracer.mkdir(destdir)
+            self._tracer.system('rm -rf ' + destdir)
+#        else:
+#            self._tracer.mkdir(destdir)
 
         self._tracer.mv(self._tempdir, destdir)
 	self._tracer.rmdir(self._tempdir)
openSUSE Build Service is sponsored by