

def DownloadActivity(self, serviceRecord, activity):
    if (not activity.ServiceData['Tagged']):
        if (not (hasattr(serviceRecord, 'Config') and ('UploadUntagged' in serviceRecord.Config) and serviceRecord.Config['UploadUntagged'])):
            raise APIExcludeActivity('Activity untagged', permanent=False, activity_id=activity.ServiceData['Path'], user_exception=UserException(UserExceptionType.Untagged))
    path = activity.ServiceData['Path']
    dbcl = self._getClient(serviceRecord)
    (fullActivity, rev) = activity._getActivity(serviceRecord, dbcl, path)
    fullActivity.Type = activity.Type
    fullActivity.ServiceDataCollection = activity.ServiceDataCollection
    activity = fullActivity
    if (activity.CountTotalWaypoints() <= 1):
        raise APIExcludeActivity('Too few waypoints', activity_id=path, user_exception=UserException(UserExceptionType.Corrupt))
    return activity

dataset/ETHPy150Open cpfair/tapiriik/tapiriik/services/Dropbox/dropbox.py DropboxService.DownloadActivity/VarMisuse@111/161 `self`->`activity`