示例#1
0
 def __call__(self, args):
     super(WipeCommand, self).__call__(args)
     if args.everything:
         shutil.rmtree(get_persist_dir())
     else:
         for platform in pebble_platforms:
             shutil.rmtree(get_sdk_persist_dir(platform))
示例#2
0
 def __call__(self, args):
     super(WipeCommand, self).__call__(args)
     if args.everything:
         shutil.rmtree(get_persist_dir())
     else:
         for platform in pebble_platforms:
             shutil.rmtree(get_sdk_persist_dir(platform))
示例#3
0
    def _get_machine_identifier(self):
        # Get installation info. If we detect a new install, post an appropriate event
        settings_dir = get_persist_dir()
        client_id_file = os.path.join(settings_dir, "client_id")

        # Get (and create if necessary) the client id
        try:
            with open(client_id_file) as f:
                return f.read()
        except IOError:
            client_id = str(uuid.uuid4())
            with open(client_id_file, 'w') as f:
                f.write(client_id)
            return client_id
示例#4
0
    def _get_machine_identifier(self):
        # Get installation info. If we detect a new install, post an appropriate event
        settings_dir = get_persist_dir()
        client_id_file = os.path.join(settings_dir, "client_id")

        # Get (and create if necessary) the client id
        try:
            with open(client_id_file) as f:
                return f.read()
        except IOError:
            client_id = str(uuid.uuid4())
            with open(client_id_file, 'w') as f:
                f.write(client_id)
            return client_id
示例#5
0
 def pending_filename(self):
     return os.path.join(get_persist_dir(), "pending_analytics.json")
示例#6
0
 def get_option_dir(cls):
     return get_persist_dir()
示例#7
0
 def pending_filename(self):
     return os.path.join(get_persist_dir(), "pending_analytics.json")
示例#8
0
 def get_option_dir(cls):
     return get_persist_dir()
示例#9
0
 def get_option_dir(cls):
     try:
         return os.path.normpath(os.path.join(sdk_path(), '..'))
     except MissingSDK:
         return get_persist_dir()