porting set_release.sh to a python function

Can't test atm as factory is not snapshottable
Merge pull request #148 from openSUSE/set_release

porting set_release.sh to a python function