Обновлен copyright

develop 3.1.7
Mike khiretskiy 11 years ago
parent 320a7a13f3
commit 17e317796f

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -463,63 +463,3 @@ def get_password_from_daemon(server_host, server_port, wait_thread):
else:
password = resp if resp else None
return password
#def get_password_from_daemon(server_host, server_port, set_pass = False):
# host = '' # ip
# port = 5501 # порт
# size = 1024 # размер данных
# find_proc = False
# username = pwd.getpwuid(os.getuid()).pw_name
# for run_commands in filter(lambda x:'s.py' in x[0],getRunProc()):
# if 'python' in run_commands[0]:
# if username == owner(run_commands[1]):
# #print 'YES'
# find_proc = True
#
# home_path = pwd.getpwuid(os.getuid()).pw_dir
# file_path = os.path.join(home_path, '.calculate', 'passwd_daemon')
# if not find_proc:
# os.unlink(file_path)
#
# cmd = ['/var/calculate/s.py']
# #print cmd
# subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
# stdout=subprocess.PIPE, stderr=subprocess.PIPE)
#
# s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
# while True:
# try:
# s.bind((host,port)) # ассоциировать адрес с сокетом
# break
# except socket.error:
# port += 1
# connect_error = 0
# while connect_error < 16:
# try:
# while connect_error < 10:
# if os.path.isfile(file_path):
# serv_port, hash_val = open(file_path, 'r').read().split()
# break
# else:
# connect_error += 1
# time.sleep(0.3)
# s.connect(('localhost', int(serv_port)))
# break
# except socket.error:
# time.sleep(0.3)
# #print s.recv(1024)
# req = '%s,%s,%s,%s' %(server_host, str(server_port), username, hash_val)
# s.send(req)
# resp = s.recv(size)
# if resp.startswith('Error'):
# password = getpass()
# msg = '%s,%s' %(req,password)
# s.send(msg)
# resp = s.recv(size)
# if resp.startswith('Error'):
# print resp
# else:
# password = resp if resp else None
# return password
######################### End get password

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

@ -1,7 +1,6 @@
#!/usr/bin/python
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -32,7 +32,6 @@ from logging import getLogger
from calculate.console.datavars import DataVarsConsole
from calculate.lib.cl_lang import setLocalTranslate
setLocalTranslate('cl_console3',sys.modules[__name__])
#import cert_func.verify
log = getLogger(__name__)
flag = 0

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -19,21 +19,6 @@ from function import get_sid
from calculate.lib.cl_lang import setLocalTranslate
setLocalTranslate('cl_console3',sys.modules[__name__])
#def client_sid(sid, client, cert_id, clVars, show_info = False):
# """ get number session from server and write this in file """
# lang = os.environ['LANG'][:2]
#
# new_sid = client.service.post_sid(sid=sid, cert_id=cert_id, lang=lang)
# fi = open(client.SID_FILE, 'w')
# sid = str(new_sid[0][0])
# fi.write(sid)
# fi.close()
# if show_info:
# if new_sid[0][1] == 1:
# print _(" New Session")
# else: print _(" Old Session")
# print _(" Your session ID = %s") %sid
def client_del_sid(client):
""" delete this session """
sid = get_sid(client.SID_FILE)

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2010 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2008-2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
# Copyright 2011-2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

Loading…
Cancel
Save