eric7_api: added code to append the '.api' file extension if not given by the user. eric7

Sun, 06 Jun 2021 16:24:01 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 06 Jun 2021 16:24:01 +0200
branch
eric7
changeset 8408
a8eb084b974e
parent 8407
d6f374ab42eb
child 8409
78c008a54656

eric7_api: added code to append the '.api' file extension if not given by the user.

eric7/eric7_api.py file | annotate | diff | comparison | revisions
--- a/eric7/eric7_api.py	Sun Jun 06 15:24:44 2021 +0200
+++ b/eric7/eric7_api.py	Sun Jun 06 16:24:01 2021 +0200
@@ -193,6 +193,10 @@
             DocumentationTools.supportedExtensionsDictForApis[progLanguage]
         )
         supportedExtensions.extend(extensions)
+        
+        if not outputFileName.endswith(".api"):
+            # append the .api extension, if not given by the user
+            outputFileName += ".api"
         if "%L" in outputFileName:
             outputFile = outputFileName.replace("%L", progLanguage)
         else:

eric ide

mercurial