Ignore:
Timestamp:
03/15/11 15:01:11 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
07029ab1535e62ba413dc47b8f1fe577ec0c84bb
Message:

serverfiles: update and needs_update take an optional ServerFiles object instead of access_code. orngServerFiles modified for backwards compatibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/orngServerFiles.py

    r7742 r7744  
    11from Orange.misc.serverfiles import * 
     2import Orange 
    23 
     4#for backward compatibility 
     5 
     6def _sf_with_code(access_code=None): 
     7    if not access_code: 
     8        return ServerFiles() 
     9    else: 
     10        return ServerFiles(access_code=access_code) 
     11 
     12def needs_update(domain, filename, access_code=None): 
     13    sf = _sf_with_code(access_code=access_code) 
     14    return Orange.misc.serverfiles.needs_update(domain, filename, serverfiles=sf) 
     15 
     16def update(domain, filename, access_code=None, verbose=True): 
     17    sf = _sf_with_code(access_code=access_code) 
     18    return Orange.misc.serverfiles.update(domain, filename, serverfiles=sf, verbose=verbose) 
Note: See TracChangeset for help on using the changeset viewer.