Fix deprecation warnings in gerrit module

Change-Id: If62fcbddaf723eb1190c2d20640d234f9594825c
Merge "Fix deprecation warnings in gerrit module"