Subversion Repositories SmartDukaan

Rev

Rev 13486 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13486 Rev 21090
Line 7... Line 7...
7
import time
7
import time
8
from time import strftime
8
from time import strftime
9
from shop2020.thriftpy.model.v1.catalog.ttypes import status
9
from shop2020.thriftpy.model.v1.catalog.ttypes import status
10
from shop2020.thriftpy.model.v1.user.ttypes import Address
10
from shop2020.thriftpy.model.v1.user.ttypes import Address
11
from shop2020.config.client.ConfigClient import ConfigClient
11
from shop2020.config.client.ConfigClient import ConfigClient
-
 
12
import random
12
 
13
 
13
def to_py_date(java_timestamp):
14
def to_py_date(java_timestamp):
14
    try:
15
    try:
15
        seconds = java_timestamp / 1000
16
        seconds = java_timestamp / 1000
16
        sub_seconds  = (java_timestamp % 1000.0) / 1000.0
17
        sub_seconds  = (java_timestamp % 1000.0) / 1000.0
Line 86... Line 87...
86
def to_address_string(address):
87
def to_address_string(address):
87
    address = Address
88
    address = Address
88
    pass
89
    pass
89
 
90
 
90
def getSyncOperatorsForRecharge():
91
def getSyncOperatorsForRecharge():
91
    return []
-
 
92
92
    return []
-
 
93
 
-
 
94
def generate_random_code(length):
-
 
95
    allowed_chars = "ABCDEFGHJKMNPQRSTUVWXYZ3456789"
-
 
96
    code = ""
-
 
97
    for i in range(length):
-
 
98
        next_index = random.randrange(len(allowed_chars))
-
 
99
        code = code + allowed_chars[next_index]
-
 
100
    return code
-
 
101
 
-
 
102