ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ iB^c @`sddlmZddlmZddlmZddlZddlZddlZddljj j Z ddl Z ddl mZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZmZddlmZm Z dZ!eZ"de$dZ%ddZ&dZ'dZ(ddZ)dddddddddZ*dZ+ddZ,ddZ-ddZ.ddZ/ddZ0dddZ1de$ddZ2d Z3d!Z4dS("i(tprint_function(tabsolute_import(tdivisionN(tConnectionError(t iteritemsi(t clpassenger(t clselectctl(tutils(t userdomains(tClSelectExcept(tApplicationsManager(t environmentst interpreters(tAPP_STARTED_CONSTtAPP_STOPPED_CONSTsapp.jscC`st||}|s|}ntj|||}|j sF|rytjdd|}Wn tk rtj|nX|j|d|n|S(Ntkeytversiont destroy_first( t _get_prefixR t EnvironmenttexistsR tKeyErrorR tNoSuchAlternativeVersiontcreate(tusert directoryRtenv_nameRtprefixt environmentt interpreter((sO/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectctlnodejsuser.pyt_create_environment!s  cC`st||}|dkrmtj|}ytj|||}Wqmtk ritjd|qmXn|d}t j j t j j t j j |}t j|||}|S(Ns8No such application (or application not configured) "%s"tbinary(RtNoneRtsummaryRtget_using_realpath_keysRR tNoSuchApplicationtostpathtbasenametdirnameR R(RRt app_summaryRt user_summaryRRR((sO/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectctlnodejsuser.pyt_get_environment/s   *cC`s.tj||\}}tjjtj|S(N(Rt get_abs_relR$R%tjoinR tDEFAULT_PREFIX(RRt_trel_dir((sO/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectctlnodejsuser.pyR?scC`sAddlm}|jj|s=tj||dndS(s Check whether particular interpreter version is enabled and raises exception if not :param user: user to include in exception i(t node_managersversion is not enabledN(tclselectnodejsR0t NodeManagertis_version_enabledR tUnableToSetAlternative(RRR0((sO/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectctlnodejsuser.pyt_ensure_version_enabledDscC`s|dkrt}ntj||\}}|j|}xM|jD]?}tj||\}}|tjj|tjrL|SqLWdS(s Return None if new_app_directory is not nested inside an existing user application, and the name of conflicting application otherwise N( R R RR+tget_user_config_datatkeysR$tsept startswith(tnew_app_directoryRt apps_managert abs_app_pathR.t full_configt existing_apptexisting_app_abs_path((sO/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectctlnodejsuser.pyt_get_existing_nesting_app_forPs  c  C`s| dkrt} n|dkr6tjdnt|||dkrXt}n|dkrmi}n|dkrd}nt||| } | dk rtj| ntj |}t |||} | j j } t j|||| j| d|d|d| t j|||sWt j|}tj|||}|d}ni|d6|d6|d 6td 6|d 6|d 6gd 6|d6}| r| |d summary info about user's web application :param user: str -> name of unix user :return: tuple -> (alias, domain) s3Was passed incorrect summary info about applications!Was passed incorrect name of userROtdocrootis-Can not found suitable domain for applicationN(R R RFRRtrealpaths_are_equaltlen(R(RROt user_domainsRERBt found_domainst app_domain((sO/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectctlnodejsuser.pyt_get_info_about_webapps    % t-c `sE|d krt}n|j}ytj|}Wn)tk rktjdjnX|dt krt }n|d}|d}|d} tj \} t | fd} |s:yt d|d|d| WqAtjk r6} tjd | qAXn| d S( s Install nodejs extension to user's webapp :param user: name os unix user :param directory: directory with webapp (app-root) :param extension: name and version of extension :param skip_web_check: skip check web application after change it's properties :param apps_manager: Application Manager. Class that responsible for gathering and writing information about applications :return: None s%Record about application {} is absentRitapp_uriREtnodejs_versionc`s*jddtjdS(Nt extensiontcwd(textension_installRRL((RRRRR(sO/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectctlnodejsuser.pyRsRORs3An error occured during installation of modules. %sN(R R R6RR"RR RFRR tTrueR+RRR( RRRtskip_web_checkR;t user_configRURORRR.Rterr((RRRRRsO/opt/alt/python27/lib/python2.7/site-packages/clselect/clselectctlnodejsuser.pytinstalls0        cC`si}xttj|D]\}}|dtjkrAqnt|||j}i|dd6|dd6|dd6|dd6||sH        A " C    9/