Page MenuHomeLubuntu

Refactor automirror
ClosedPublic

Authored by apt-ghetto on Dec 25 2018, 9:50 AM.

Details

Summary
  • Updated automirror.conf
    • Removed useless configs
    • Added URL for the country code
  • Refactored main.py
    • Added dictionary with the subdomains of some countries
    • Simplified logic
    • Removed premature optimizations
    • Renamed variables and methods
Test Plan

Compare this version with the previous version. The behaviour is expected to be the same.

Diff Detail

Repository
rCALASETTINGS Ubuntu Calamares Settings
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

apt-ghetto requested review of this revision.Dec 25 2018, 9:50 AM
apt-ghetto created this revision.

I tried to add also unit tests, but this didn't work because of libcalamares (ImportError).

common/modules/automirror/main.py
113

Where does this logger come from?

121–122

A logger should be the better choice instead of a print statement

This revision was not accepted when it landed; it landed in state Needs Review.Jan 12 2019, 3:29 PM
Closed by commit rCALASETTINGS2ea0f7f12da8: Refactor automirror (authored by apt-ghetto, committed by tsimonq2). · Explain Why
This revision was automatically updated to reflect the committed changes.