Update AdobeCC2019Importer.py
Linted
#!/usr/bin/python
+
'''
-Copyright (c) 2019, dataJAR Ltd. All rights reserved.
+Copyright (c) 2020, dataJAR Ltd. All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
@@ -11,7 +13,8 @@ Copyright (c) 2019, dataJAR Ltd. All rights reserved.
* Neither data JAR Ltd nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
- THIS SOFTWARE IS PROVIDED BY DATA JAR LTD 'AS IS' AND ANY
+
+ THIS SOFTWARE IS PROVIDED BY DATA JAR LTD "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL DATA JAR LTD BE LIABLE FOR ANY
@@ -21,31 +24,25 @@ Copyright (c) 2019, dataJAR Ltd. All rights reserved.
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
SUPPORT FOR THIS PROGRAM
- This program is distributed 'as is' by DATA JAR LTD.
- For more information or support, please utilise the following resources:
- http://www.datajar.co.uk
+
+ This program is distributed "as is" by DATA JAR LTD.
DESCRIPTION
Imports Adobe CC 2019 titles found in running users ~/Downloads
-
'''
-
-# Version
-__version__ = '1.0'
-
-
-# Standard Imports
import argparse
import glob
import os
import subprocess
import sys
+__version__ = '1.1'
+
-# Script
def main():
'''Gimme some main'''
@@ -70,14 +67,6 @@ def main():
pkg_checker(adobe_folders)
-def file_len(run_day):
- ''' For each weekdays recipe list, return a count '''
-
- line_count = len(open(ADOBE_LIST).readlines())
-
- return line_count
-
-
def pkg_checker(adobe_folders):
''' Check that we have the Install_pkg's & proceed if we do'''
@@ -145,10 +134,10 @@ if __name__ == '__main__':
sys.exit(1)
# Parse recipe type argument
- parser = argparse.ArgumentParser()
- parser.add_argument('type', type=str, help='Recipe type, either "munki" or "jss"')
- args = parser.parse_args()
- RECIPE_TYPE = args.type.lower()
+ PARSER = argparse.ArgumentParser()
+ PARSER.add_argument('type', type=str, help='Recipe type, either "munki" or "jss"')
+ PARSER_ARGS = PARSER.parse_args()
+ RECIPE_TYPE = PARSER_ARGS.type.lower()
# Constants
DOWNLOADS_PATH = os.path.expanduser('~/Downloads/')
