trivial: apply pre-commit
gitea/publik-imio-industrialisation/pipeline/head This commit looks good
Details
gitea/publik-imio-industrialisation/pipeline/head This commit looks good
Details
This commit is contained in:
parent
6c29f5fd7c
commit
75f4301241
|
@ -2,11 +2,12 @@ Source: publik-imio-industrialisation
|
|||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Frédéric Péters <fpeters@entrouvert.com>
|
||||
Build-Depends: debhelper-compat (= 12)
|
||||
Build-Depends: debhelper-compat (= 12),
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: https://git.entrouvert.org/publik-imio-industrialisation.git
|
||||
|
||||
Package: publik-imio-industrialisation
|
||||
Architecture: all
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Description: Publik iMio Industrialiastion Commands
|
||||
|
|
|
@ -5,12 +5,12 @@ import xml.etree.ElementTree as ET
|
|||
from wcs.blocks import BlockDef
|
||||
from wcs.carddef import CardDef
|
||||
from wcs.categories import (
|
||||
Category,
|
||||
CardDefCategory,
|
||||
WorkflowCategory,
|
||||
BlockCategory,
|
||||
MailTemplateCategory,
|
||||
CardDefCategory,
|
||||
Category,
|
||||
DataSourceCategory,
|
||||
MailTemplateCategory,
|
||||
WorkflowCategory,
|
||||
)
|
||||
from wcs.data_sources import NamedDataSource
|
||||
from wcs.formdef import FormDef
|
||||
|
@ -22,6 +22,7 @@ from ..qommon.ctl import Command, make_option
|
|||
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
|
||||
|
||||
class Cmd(Command):
|
||||
name = 'imio_import_directory'
|
||||
|
||||
|
@ -62,7 +63,7 @@ class Cmd(Command):
|
|||
if not os.path.exists(os.path.join(self.directory, dirname)):
|
||||
continue
|
||||
for filename in os.listdir(os.path.join(self.directory, dirname)):
|
||||
logging.info ('Importing %s %s', dirname, filename)
|
||||
logging.info('Importing %s %s', dirname, filename)
|
||||
category = category_klass.import_from_xml(
|
||||
open(os.path.join(self.directory, dirname, filename))
|
||||
)
|
||||
|
@ -203,7 +204,6 @@ class Cmd(Command):
|
|||
setattr(existing_carddef, attribute, getattr(carddef, attribute))
|
||||
existing_carddef.store(comment='Indus Update')
|
||||
|
||||
|
||||
def import_formdefs(self):
|
||||
if not os.path.exists(os.path.join(self.directory, 'forms')):
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue