Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 279845 | Differences between
and this patch

Collapse All | Expand All

(-)cycle-0.3.1/dialogs.py (-13 / +13 lines)
Lines 182-200 def get_users(): Link Here
182
    p, f_name=get_f_name()
182
    p, f_name=get_f_name()
183
    if os.path.exists(p):
183
    if os.path.exists(p):
184
	files=os.listdir(p)
184
	files=os.listdir(p)
185
    for f in files:
185
        for f in files:
186
	fd=open(os.path.join(p, f),"rb")
186
	    fd=open(os.path.join(p, f),"rb")
187
	tmp=fd.read(len(magic_str))
187
	    tmp=fd.read(len(magic_str))
188
	if tmp == magic_str:
188
	    if tmp == magic_str:
189
	    tmp=fd.read(100)
189
	        tmp=fd.read(100)
190
	    n=tmp.find("===") #find end string
190
	        n=tmp.find("===") #find end string
191
	    if n <> -1:
191
	        if n <> -1:
192
		users.append((cPickle.loads(tmp[:n]), f))
192
		    users.append((cPickle.loads(tmp[:n]), f))
193
	else: # old format, user_name=file_name
193
	    else: # old format, user_name=file_name
194
	    users.append((f,f))
194
	        users.append((f,f))
195
#    if not users:
195
#        if not users:
196
#	users=[(_('empty'),"empty")]
196
#	    users=[(_('empty'),"empty")]
197
    users.sort()
197
        users.sort()
198
    return users
198
    return users
199
199
200
#---------------------------------------------------------------------------
200
#---------------------------------------------------------------------------

Return to bug 279845