source: orange/orange/orngServerFiles.py @ 7744:ccb8bd3760c0

Revision 7744:ccb8bd3760c0, 623 bytes checked in by markotoplak, 3 years ago (diff)

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

Line 
1from Orange.misc.serverfiles import *
2import Orange
3
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 TracBrowser for help on using the repository browser.