Warning, file /plasma/aura-browser/app/third-party/ad-block/scripts/lib/config.py was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #!/usr/bin/env python 0002 0003 import errno 0004 import os 0005 import platform 0006 import sys 0007 0008 0009 BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \ 0010 'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent' 0011 LIBCHROMIUMCONTENT_COMMIT = 'cfbe8ec7e14af4cabd1474386f54e197db1f7ac1' 0012 0013 PLATFORM = { 0014 'cygwin': 'win32', 0015 'darwin': 'darwin', 0016 'linux2': 'linux', 0017 'win32': 'win32', 0018 }[sys.platform] 0019 0020 verbose_mode = False 0021 0022 0023 def get_platform_key(): 0024 if os.environ.has_key('MAS_BUILD'): 0025 return 'mas' 0026 else: 0027 return PLATFORM 0028 0029 0030 def get_target_arch(): 0031 try: 0032 target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor', 0033 'brightray', 'vendor', 'download', 0034 'libchromiumcontent', '.target_arch') 0035 with open(os.path.normpath(target_arch_path)) as f: 0036 return f.read().strip() 0037 except IOError as e: 0038 if e.errno != errno.ENOENT: 0039 raise 0040 0041 if PLATFORM == 'win32': 0042 return 'ia32' 0043 else: 0044 return 'x64' 0045 0046 0047 def get_chromedriver_version(): 0048 return 'v2.15' 0049 0050 0051 def s3_config(): 0052 config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''), 0053 os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''), 0054 os.environ.get('ATOM_SHELL_S3_SECRET_KEY', '')) 0055 message = ('Error: Please set the $ATOM_SHELL_S3_BUCKET, ' 0056 '$ATOM_SHELL_S3_ACCESS_KEY, and ' 0057 '$ATOM_SHELL_S3_SECRET_KEY environment variables') 0058 assert all(len(c) for c in config), message 0059 return config 0060 0061 0062 def enable_verbose_mode(): 0063 print 'Running in verbose mode' 0064 global verbose_mode 0065 verbose_mode = True 0066 0067 0068 def is_verbose_mode(): 0069 return verbose_mode