File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
rootfs/var/www/leaf-isle-bagger Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -113,20 +113,22 @@ def create_aip(node_list, bagger_app_path):
113113 # https://docs.python.org/3/library/subprocess.html
114114 logging .info (f" Generating AIP: { node } " )
115115 try :
116- subprocess .run (
116+ ret = subprocess .run (
117117 [
118118 "./bin/console" ,
119119 "app:islandora_bagger:create_bag" ,
120- "-vvv" ,
121120 "--settings=var/sample_per_bag_config.yaml" ,
122121 f"--node={ node } " ,
123122 ],
124123 stdout = subprocess .PIPE ,
125124 stderr = subprocess .STDOUT ,
126- check = True ,
125+ check = False ,
127126 cwd = bagger_app_path ,
128127 text = True ,
129128 )
129+ if ret .returncode != 0 :
130+ logging .critical (f"{ ret .stdout } " )
131+ ret .check_returncode ()
130132 except subprocess .CalledProcessError as e :
131133 logging .error (f"{ e } " )
132134 except Exception as e :
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def main():
129129 logging_handlers .append (logging .FileHandler (args .error_log ))
130130
131131 # Config Logging
132- logging .basicConfig (level = args .logging_level , handers = logging_handlers )
132+ logging .basicConfig (level = args .logging_level , handlers = logging_handlers )
133133 logging .getLogger ("swiftclient" ).setLevel (logging .CRITICAL )
134134
135135 username , password = drupalUtilities .get_drupal_credentials ()
You can’t perform that action at this time.
0 commit comments