@@ -340,7 +340,7 @@ def request_license_data(self, url, username, api_key, license_key):
340340 username + '/' + api_key , error_msg ))
341341 else :
342342 # FIXME: would this be only with a 404?
343- self .errors .append (Error (VALUE , 'dje_license ' , license_key ,
343+ self .errors .append (Error (VALUE , 'dje_license_key ' , license_key ,
344344 "Invalid 'dje_license_key'" ))
345345 except urllib2 .URLError :
346346 if about .check_network_connection ():
@@ -413,26 +413,26 @@ def get_dje_license_list(self, gen_location, input_list, gen_license, dje_licens
413413 self .errors .append (Error (FILE , 'license_text_file' , license_file , "The 'license_text_file' does not exist." ))
414414 else :
415415 if gen_license :
416- if line ['dje_license ' ]:
416+ if line ['dje_license_key ' ]:
417417 license_output_list .append (self .gen_license_list (line ))
418418 lic_name = line ['dje_license_name' ]
419419 line ['license_text_file' ] = dje_license_dict [lic_name ][0 ] + '.LICENSE'
420420 else :
421- self .warnings .append (Warn (VALUE , 'dje_license ' , '' ,
422- "Missing 'dje_license ' for " + line ['about_file' ]))
421+ self .warnings .append (Warn (VALUE , 'dje_license_key ' , '' ,
422+ "Missing 'dje_license_key ' for " + line ['about_file' ]))
423423 # This except condition will force the tool to create the
424424 # 'license_text_file' key column from the self.gen_license_list(line)
425425 except Exception :
426426 # FIXME: this is too complex
427427 if gen_license :
428- if line ['dje_license ' ]:
428+ if line ['dje_license_key ' ]:
429429 license_output_list .append (self .gen_license_list (line ))
430430 lic_name = line ['dje_license_name' ]
431431 if lic_name :
432432 line ['license_text_file' ] = dje_license_dict [lic_name ][0 ] + '.LICENSE'
433433 else :
434- self .warnings .append (Warn (VALUE , 'dje_license ' , '' ,
435- "Missing 'dje_license ' for " + line ['about_file' ]))
434+ self .warnings .append (Warn (VALUE , 'dje_license_key ' , '' ,
435+ "Missing 'dje_license_key ' for " + line ['about_file' ]))
436436 return license_output_list
437437
438438 def pre_process_and_dje_license_dict (self , input_list , api_url , api_username , api_key ):
@@ -441,14 +441,14 @@ def pre_process_and_dje_license_dict(self, input_list, api_url, api_username, ap
441441 license_dict = {}
442442 for line in input_list :
443443 try :
444- if line ['dje_license ' ]:
445- if '\n ' in line ['dje_license ' ]:
444+ if line ['dje_license_key ' ]:
445+ if '\n ' in line ['dje_license_key ' ]:
446446 line ['dje_license_name' ] = ""
447- self .errors .append (Error (VALUE , 'dje_license ' ,
448- line ['dje_license ' ],
447+ self .errors .append (Error (VALUE , 'dje_license_key ' ,
448+ line ['dje_license_key ' ],
449449 "No multiple licenses or newline character are accepted." ))
450450 continue
451- lic = line ['dje_license ' ]
451+ lic = line ['dje_license_key ' ]
452452 if not lic in license_dict :
453453 detail_list = []
454454 detail = self .get_license_details_from_api (api_url , api_username , api_key , lic )
@@ -464,8 +464,8 @@ def pre_process_and_dje_license_dict(self, input_list, api_url, api_username, ap
464464 line ['dje_license_name' ] = license_dict [lic ]
465465 line ['dje_license_url' ] = dje_lic_urn + lic
466466 except Exception :
467- err = Warn (VALUE , 'dje_license ' , '' ,
468- 'Missing "dje_license " for ' + line ['about_file' ])
467+ err = Warn (VALUE , 'dje_license_key ' , '' ,
468+ 'Missing "dje_license_key " for ' + line ['about_file' ])
469469 self .warnings .append (err )
470470 return key_text_dict
471471
@@ -823,7 +823,6 @@ def main(parser, options, args):
823823 gen .copy_files (output_path , license_list )
824824
825825 if license_text_path :
826- print (normpath (license_text_path ))
827826 if not isdir (license_text_path ):
828827 print ("The '--license_text_location' <license_path> "
829828 "must be a directory." )
@@ -844,11 +843,11 @@ def main(parser, options, args):
844843 sys .exit (errno .EINVAL )
845844 for line in input_list :
846845 try :
847- if line ['dje_license ' ]:
846+ if line ['dje_license_key ' ]:
848847 break
849848 except Exception as e :
850849 print (repr (e ))
851- print ("The input does not have the 'dje_license ' "
850+ print ("The input does not have the 'dje_license_key ' "
852851 "key which is required." )
853852 sys .exit (errno .EINVAL )
854853
0 commit comments