Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias alias FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad For TupleStore NameStore NameStore TupleLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad body For NameStore ListLoad Str Str Str body Assign TupleStore SubscriptStore NameLoad Index NameLoad NameStore NameStore Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index Str NameLoad For NameStore ListLoad Str Str Str Str body If CompareGt SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad body If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad orelse Print AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad While CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Break Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call AttributeLoad NameLoad attr keyword Call NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body While NameLoad body TryExcept body Expr Call NameLoad Break handlers ExceptHandler type TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body While NameLoad body TryExcept body Expr Call NameLoad NameLoad NameLoad NameLoad Break handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str ExceptHandler type TupleLoad AttributeLoad NameLoad attr NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad Lambda arguments args defaults Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad decorator_list
N/A N/A 
    Copyright 2010 cloudControl UG (haftungsbeschraenkt)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
 N/A sys N/A os pycclib cclib cctrl.error InputErrorException messages cctrl.settings VERSION cctrl.app ParseAppDeploymentName cctrl.auth update_tokenfile delete_tokenfile read_tokenfile get_email_and_password create_token check_for_updates N/A N/A package_name latest_version_str our_version_str N/A VERSION N/A N/A 
        check if the API reports a version that is greater then our currently
        installed one
     N/A our N/A dict N/A latest N/A dict N/A N/A version suffix N/A N/A our our_version_str N/A latest latest_version_str N/A N/A part N/A major minor patch N/A N/A N/A N/A version N/A part _ suffix N/A N/A suffix partition . N/A N/A version N/A part N/A int N/A version N/A part N/A N/A version N/A suffix suffix N/A part N/A major minor patch suffix N/A N/A N/A N/A latest N/A part N/A our N/A part N/A N/A N/A part major N/A N/A N/A N/A sys exit N/A N/A N/A messages N/A UpdateRequired format package_name N/A N/A N/A sys stderr N/A N/A N/A messages N/A UpdateAvailable format package_name N/A N/A init_api N/A N/A settings N/A N/A N/A 
        This methods initializes the API but first checks for a
        CCTRL_API_URL environment variable and uses it if found.
        For Windows we also need to load ca_certs differently,
        because the httplib2 provided ones are not included due to
        py2exe.
     N/A dirname N/A N/A N/A os path dirname __file__ N/A N/A N/A len dirname 1 N/A N/A p N/A N/A N/A os path join dirname cacerts.txt N/A N/A N/A N/A os path exists p N/A N/A N/A cclib CA_CERTS p N/A N/A dirname N/A N/A N/A os path dirname dirname N/A N/A N/A cclib API token N/A read_tokenfile settings url N/A settings api_url token_source_url N/A settings token_source_url register_addon_url N/A settings register_addon_url encode_email N/A settings encode_email N/A execute_command N/A N/A api command settings N/A N/A N/A True N/A N/A N/A N/A N/A command N/A N/A N/A N/A N/A N/A cclib TokenRequiredError N/A cclib UnauthorizedError N/A N/A N/A email password N/A get_email_and_password settings N/A N/A create_token api settings email password N/A N/A ParseAppDeploymentName N/A N/A N/A N/A sys exit N/A messages N/A InvalidAppOrDeploymentName N/A execute_with_authenticated_user N/A N/A api command settings N/A N/A N/A True N/A N/A N/A N/A N/A execute_command api command settings N/A N/A N/A N/A N/A cclib ForbiddenError N/A e N/A N/A N/A N/A sys exit N/A messages N/A NotAllowed N/A N/A N/A cclib ConnectionException N/A N/A N/A N/A sys exit N/A messages N/A APIUnreachable N/A N/A N/A N/A cclib APIException InputErrorException N/A e N/A N/A N/A N/A sys exit e N/A run N/A N/A args api settings N/A N/A N/A 
        run takes care of calling the action with the needed arguments parsed
        using argparse.

        We first try to call the action. In case the called action requires a
        valid token and the api instance does not have one a TokenRequiredError
        gets raised. In this case we catch the error and ask the user for a
        email/password combination to create a new token. After that we call
        the action again.

        pycclib raises an exception any time the API does answer with a
        HTTP STATUS CODE other than 200, 201 or 204. We catch these exceptions
        here and stop cctrlapp using sys.exit and show the error message to the
        user.
     N/A N/A execute_with_authenticated_user api N/A N/A N/A N/A N/A N/A args func args settings N/A shutdown N/A N/A api settings N/A N/A N/A 
        shutdown handles updating or deleting the token file on disk each time
        cctrl finishes or gets interrupted.
     N/A N/A N/A api check_token N/A N/A N/A update_tokenfile api settings N/A N/A N/A delete_tokenfile settings N/A