Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def reset_game_notification_settings():

    try:

        yaml_path = _get_settings_path()
        with open(unicode(yaml_path), 'wb') as f:
            data = {
                'email_setting': 1,
                'site_setting': 1
            }
            yaml.safe_dump(data, f, default_flow_style=False)

    except IOError as e:
        s = 'Failed resetting gamenotifications.yaml file %s' % str(e)
        LOG.error(s)
        raise GameNotificationSettingsError(s)
        


src/t/u/turbulenz_local-1.1.4/turbulenz_local/controllers/apiv1/gamenotifications.py   turbulenz_local(Download)
from turbulenz_local.models.gamelist import get_game_by_slug
from turbulenz_local.models.userlist import get_current_user
from turbulenz_local.models.apiv1.gamenotifications import GameNotificationTask, reset_game_notification_settings, \
                                                           GameNotificationTaskError, GameNotificationPathError, \
                                                           GameNotificationsUnsupportedException, \
        except (GameNotificationSettingsError, GameNotificationPathError):
            try:
                reset_game_notification_settings()
 
                response.status_int = 404

src/t/u/turbulenz_local-HEAD/turbulenz_local/controllers/apiv1/gamenotifications.py   turbulenz_local(Download)
from turbulenz_local.models.gamelist import get_game_by_slug
from turbulenz_local.models.userlist import get_current_user
from turbulenz_local.models.apiv1.gamenotifications import GameNotificationTask, reset_game_notification_settings, \
                                                           GameNotificationTaskError, GameNotificationPathError, \
                                                           GameNotificationsUnsupportedException, \
        except (GameNotificationSettingsError, GameNotificationPathError):
            try:
                reset_game_notification_settings()
 
                response.status_int = 404