397. If at the time of committing or attempting to commit robbery, the offender is armed with or uses any deadly weapon, or causes grievous hurt to any person, or attempts to cause death or grievous hurt to any person, such offender shall be liable to be whipped, in addition to any other punishment to which he may be liable under any other section of this Code.