Commits

Alexander Dudko committed 48779e2

UTF8 BOM fix

  • Participants
  • Parent commits bd94409

Comments (0)

Files changed (3)

File bin/jira-bulk-loader.py

     exit(1)
 
 options = {}
-if args.dueDate: options['duedate'] = args.dueDate
-if args.priority: options['priority'] = {'name':args.priority}
-if args.project: options['project'] = {'key':args.project}
+if args.duedate is not None: options['duedate'] = args.duedate
+if args.priority is not None: options['priority'] = {'name':args.priority}
+if args.project is not None: options['project'] = {'key':args.project}
 
-task_ext = TaskExtractor(args.hostname, args.username, args.password, options, dry_run = args.dry_run)
+task_ext = TaskExtractor(args.host, args.user, args.password, options, dry_run = args.dry_run)
 
 from jirabulkloader.task_extractor_exceptions import TaskExtractorTemplateErrorProject, TaskExtractorJiraValidationError, TaskExtractorTemplateErrorJson, TaskExtractorJiraCreationError, TaskExtractorJiraHostProblem
 from jirabulkloader.jiraConnect import JiraConnectConnectionError

File jirabulkloader/interface.py

     If there is no such file, IOError exception will be raised."""
 
     import io
+    import codecs
 
     with io.open( template_filename, 'rt', encoding='utf-8' ) as f:
-        return f.read()
+        tmpl = f.read()
+        if tmpl[0] == unicode( codecs.BOM_UTF8, 'utf8' ):
+            return tmpl[1:]
+        else:
+            return tmpl
 
 
 
 setup(
     name='jira-bulk-loader',
-    version='0.1.7',
+    version='0.1.9',
     packages=['jirabulkloader','jirabulkloader.test',],
     author='Alexander Dudko',
     author_email='alex.dudko@gmail.com',